package com.qf.mapper;

import com.qf.entity.TInst;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/*
杨威
2021/11/6
15:53
*/
public interface InstMapper {
    @Insert("insert into t_inst values (0,#{instid},#{areaName},#{parentId},#{region},#{level})")
    int insert(TInst tInst);
    @Delete("delete from t_inst where id=#{id}")
    int delete(Long id);
    @Update("update t_inst set instid=#{instid} and areaName=#{areaName} and parentId=#{parentId} and region=#{region} and level=#{level} where id=#{id}")
    int update(TInst tInst);
    @Select("select * from t_inst")
    List<TInst> findAll();
    @Select("select * from t_inst where id=#{id}")
    TInst findById(Long id);
}
